package weaver.interfaces.avic;

import weaver.conn.RecordSet;
import weaver.general.BaseBean;
import weaver.general.Util;
import weaver.interfaces.workflow.action.Action;
import weaver.soa.workflow.request.RequestInfo;

/**
 * ͨ
 */
public class WeaTyyysqPdfAction extends BaseBean implements Action {
    @Override
    public String execute(RequestInfo requestInfo) {
        RecordSet rs = new RecordSet();
        String requestid = requestInfo.getRequestid();
        String tablename = requestInfo.getRequestManager().getBillTableName();
        TySignFileUtil tyfileUtil = new TySignFileUtil();
        writeLog(">>>>WeaTyyysqAction>>>>requestid=" + requestid + ",tablename=" + tablename);
        try {
            rs.executeQuery("select * from " + tablename + " where requestid=?", requestid);
            rs.next();
            String qswj = Util.null2String(rs.getString("qswj"));
            String fj = tyfileUtil.getImagefileIdByDocid(qswj);
            writeLog(">>>>WeaTyyysqAction>>>>qswj=" + qswj + ",fj=" + fj);
            return Action.SUCCESS;
        } catch (Exception e) {
            e.printStackTrace();
            requestInfo.getRequestManager().setMessageid("111111");
            requestInfo.getRequestManager().setMessagecontent("Action�ӿ��쳣������");
            return Action.FAILURE_AND_CONTINUE;
        }
    }


}
